################################################################################
# setup system defaults
################################################################################

    TARGET_CPU="cortex-a53"

    case $TARGET_ARCH in
      aarch64)
        TARGET_CPU_FLAGS="+crc+fp+simd"
        ;;
      arm)
        TARGET_CPU_FLAGS="+crc"
        TARGET_FPU="neon-fp-armv8"
        TARGET_FLOAT="hard"
        ;;
    esac

  # Bootloader to use (syslinux / u-boot / atv-bootloader / bcm2835-bootloader)
    BOOTLOADER="u-boot"

  # u-boot version to use (default)
    UBOOT_VERSION=""

  # Configuration for u-boot
    UBOOT_CONFIG=""

  # Target Configfile for u-boot
    UBOOT_CONFIGFILE=""

  # Kernel target
    KERNEL_TARGET="Image.lzo"

  # Kernel extra targets to build
    KERNEL_UBOOT_EXTRA_TARGET="gxbb_p200.dtb"

  # Build Android kernel image using mkbootimg
    BUILD_ANDROID_BOOTIMG="yes"

  # Additional options to be passed to Android mkbootimg
    ANDROID_BOOTIMG_OPTIONS="--base 0x0 --kernel_offset 0x1080000"

  # Additional kernel make parameters (for example to specify the u-boot loadaddress)
    KERNEL_MAKE_EXTRACMD=""

  # kernel image name
    KERNEL_NAME="kernel.img"

  # Kernel to use. values can be:
  # default:  default mainline kernel
    LINUX="custom"
    KERNEL_VERSION="f353216"
    KERNEL_URL="https://github.com/kszaq/linux-amlogic-le/archive/$KERNEL_VERSION.tar.gz"
    KERNEL_SOURCE_DIR="linux-amlogic-le-$KERNEL_VERSION*"
    KERNEL_PATCH_DIRS="amlogic-3.14"

################################################################################
# setup build defaults
################################################################################

  # Project CFLAGS
    PROJECT_CFLAGS=""

  # SquashFS compression method (gzip / lzo / xz)
    SQUASHFS_COMPRESSION="lzo"

################################################################################
# setup project defaults
################################################################################

  # build and install ALSA Audio support (yes / no)
    ALSA_SUPPORT="yes"

  # OpenGL(X) implementation to use (no / Mesa)
    OPENGL="no"

  # OpenGL-ES implementation to use (no / bcm2835-driver / gpu-viv-bin-mx6q / opengl-meson)
    OPENGLES="opengl-meson"

  # Amlogic Meson SOC family (8 / 6 / gxbb)
    MESON_FAMILY="gxbb"

  # include uvesafb support (yes / no)
    UVESAFB_SUPPORT="no"

  # Displayserver to use (x11 / no)
    DISPLAYSERVER="no"

  # Windowmanager to use (ratpoison / fluxbox / none)
    WINDOWMANAGER="none"

  # Xorg Graphic drivers to use (all / i915,i965,r200,r300,r600,nvidia,nouveau)
  # Space separated list is supported,
  # e.g. GRAPHIC_DRIVERS="i915 i965 r300 r600 radeonsi nvidia nouveau"
    GRAPHIC_DRIVERS=""

  # KODI Player implementation to use (default / bcm2835-driver / libfslvpuwrap / libamcodec)
    KODIPLAYER_DRIVER="libamcodec"

  # Modules to install in initramfs for early boot
    INITRAMFS_MODULES="dwc_otg dwc3 font softcursor bitblit fbcon aml_nftl_dev"

  # additional drivers to install:
  # for a list of additinoal drivers see packages/linux-drivers
  # Space separated list is supported,
  # e.g. ADDITIONAL_DRIVERS="DRIVER1 DRIVER2"
    ADDITIONAL_DRIVERS="RTL8192CU RTL8192DU RTL8192EU RTL8812AU gpu-aml qca9377-aml media_build mt7601u-aml mt7603u-aml"

  # additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware)
  # Space separated list is supported,
  # e.g. FIRMWARE="dvb-firmware misc-firmware wlan-firmware"
    FIRMWARE="misc-firmware wlan-firmware dvb-firmware brcmfmac_sdio-firmware-aml rtl8723bs_bt qca9377-firmware-aml"

  # build and install ATV IR remote support (yes / no)
    ATVCLIENT_SUPPORT="no"

  # "none" for disable LCD support
    LCD_DRIVER="none"

  # Amlogic IR remote support (yes / no)
    AMREMOTE_SUPPORT="yes"

  # build and install iSCSI support - iscsistart (yes / no)
    ISCSI_SUPPORT="no"

  # build with swap support (yes / no)
    SWAP_SUPPORT="yes"

  # swap support enabled per default (yes / no)
    SWAP_ENABLED_DEFAULT="no"

  # swapfile size if SWAP_SUPPORT=yes in MB
    SWAPFILESIZE="128"

  # build with installer (yes / no)
    INSTALLER_SUPPORT="no"

  # extra build dependeices
    EXTRA_DEPS="mkimage"
    EXTRA_DEPS_PKG="u-boot-tools"

  # set the addon dirs
    ADDON_SERVER_URL="http://kszaq.libreelec.tv/addons"
    ADDON_URL="$ADDON_SERVER_URL/$ADDON_PATH"

  # OEM packages for OEM's (yes / no)
    OEM_SUPPORT="yes"

